0b2594c5430bb265e8865b418255f4efc1edbaf2,inspections/impl/com/intellij/codeInspection/redundantCast/RedundantCastUtil.java,MyIsRedundantVisitor,visitTypeCastExpression,#PsiTypeCastExpression#,321

Before Change


      PsiElement expr = deParenthesize(operand);

      if (expr instanceof PsiTypeCastExpression) {
        PsiType castType = ((PsiTypeCastExpression)expr).getCastType().getType();
        if (!(castType instanceof PsiPrimitiveType)) {
          addToResults((PsiTypeCastExpression)expr);
        }

After Change


      PsiElement expr = PsiUtil.deparenthesizeExpression(operand);

      if (expr instanceof PsiTypeCastExpression) {
        PsiTypeElement typeElement = ((PsiTypeCastExpression)expr).getCastType();
        if (typeElement == null) return;
        PsiType castType = typeElement.getType();
        if (!(castType instanceof PsiPrimitiveType)) {
          addToResults((PsiTypeCastExpression)expr);
        }